package pers.wwz.study.xmlhttphrequest.common.exception;

public class BusinessException extends RuntimeException {

	private static final long serialVersionUID = 1L;

	/**
	 * 错误码
	 */
	protected Integer errorCode;
	/**
	 * 错误信息
	 */
	protected String errorMsg;

	public BusinessException() {
		super();
	}


	public BusinessException(String errorMsg) {
		super(errorMsg);
		this.errorMsg = errorMsg;
	}

	public BusinessException(Integer errorCode, String errorMsg) {

		this.errorCode = errorCode;
		this.errorMsg = errorMsg;
	}

	public BusinessException(Integer errorCode, String errorMsg, Throwable cause) {

		this.errorCode = errorCode;
		this.errorMsg = errorMsg;
	}


	public Integer getErrorCode() {
		return errorCode;
	}

	public void setErrorCode(Integer errorCode) {
		this.errorCode = errorCode;
	}

	public String getErrorMsg() {
		return errorMsg;
	}

	public void setErrorMsg(String errorMsg) {
		this.errorMsg = errorMsg;
	}

	public String getMessage() {
		return errorMsg;
	}

	@Override
	public Throwable fillInStackTrace() {
		return this;
	}

}
